package snippet;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Created with IntelliJ IDEA.
 * User: keita
 * Date: 15/06/13
 * Time: 15:53
 */
public class RejectHandler implements RejectedExecutionHandler {
    @Override
    public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) {
        System.out.println("thread = [" + runnable.toString() + "], rejeté par le threadPoolExecutor = [" + threadPoolExecutor.toString() + "]");

    }
}
